package com.baidu.threadPoolExcutor.threadInThreadTest;

public class ThreadFactoryMain {
    public static void main(String[] args) {
        ThreadFactory threadTools = new ThreadFactory(5, 10, "Test");

        Student student1 = new Student(1, 110);
        threadTools.execute(new ThreadTask(student1));

        Student student2 = new Student(2, 110);
        threadTools.execute(new ThreadTask(student2));

        Student student3 = new Student(3, 110);
        threadTools.execute(new ThreadTask(student3));

        Student student4 = new Student(4, 110);
        threadTools.execute(new ThreadTask(student4));

        Student student5 = new Student(5, 110);
        threadTools.execute(new ThreadTask(student5));

        Student student6 = new Student(1, 110);
        threadTools.execute(new ThreadTask(student6));

        Student student7 = new Student(1, 110);
        threadTools.execute(new ThreadTask(student7));

    }
}
